package com.bj58.data.emailreports.service.impl;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.bj58.data.emailreports.dao.CommonDao;
import com.bj58.data.emailreports.dao.SrcDbPool.DBType;
import com.bj58.data.emailreports.model.DataInfo;
import com.bj58.data.emailreports.service.DataInfoService;
import com.bj58.data.emailreports.utils.CommonDataDeal;
import com.bj58.data.emailreports.utils.SortUtil;

public class DataInfoServiceImpl implements DataInfoService {
	private CommonDao comDao = new CommonDao();
	private CommonDataDeal comDeal = new CommonDataDeal();
	private SortUtil sortUtil = new SortUtil();
	
	public String checkDataSource(String date)throws Exception{
		String month = date.substring(0,date.lastIndexOf("-")).replace("-", "");
		String condition = "stat_date = '"+date+"'";
		boolean src1 =  comDao.checkTable("t_datainfo_stat_new_"+month, condition, DBType.db_94_data_app.getValue());
		if(!src1)
			return "t_datainfo_stat_new_"+month+"为空！";
		boolean src2 =  comDao.checkTable("t_datainfo_stat_userid_"+month, condition, DBType.db_94_data_app.getValue());
		if(!src2)
			return "t_datainfo_stat_userid_"+month+"为空！";
		return "true";
	}

	//黄页本月
	@Override
	public List<DataInfo> getHYDataInfo(String date,String cityname) throws Exception{
		
		String month = date.substring(0,date.lastIndexOf("-")).replace("-", "");
		StringBuffer sql = new StringBuffer();
		String cols1[]={"city","cate","infoAdd","userAdd","infoAdd_VIP","userAdd_VIP","avgInfoAdd","avgUserAdd","avgInfoAdd_VIP","avgUserAdd_VIP"};
		List<String> colsList1=Arrays.asList(cols1);
		
		sql.append("select belong_city1_name,case when belong_cate1_name='all' then '总体' else belong_cate1_name end,");
		sql.append(" SUM(if(stat_date='"+date+"' and user_type='all',info_valid_add_count,0)) '今日新增帖子数', ");
		sql.append(" sum(if(stat_date='"+date+"' and user_type='all',user_valid_add_count,0)) '今日新增发帖客户数', ");
		sql.append(" SUM(if(stat_date='"+date+"' and user_type='2',info_valid_add_count,0)) 'VIP今日新增帖子数', ");
		sql.append(" sum(if(stat_date='"+date+"' and user_type='2',user_valid_add_count,0)) 'VIP今日新增发帖客户数', ");
		sql.append(" SUM(if(user_type='all' ,info_valid_add_count,0))/count(distinct stat_date) '截至今日本月日均新增帖子数', ");
		sql.append(" SUM(if(user_type='all' ,user_valid_add_count,0))/count(distinct stat_date) '本月日均新增发帖客户数', ");
		sql.append(" SUM(if(user_type='2' ,info_valid_add_count,0))/count(distinct stat_date) '截至今日本月VIP日均新增帖子数', ");
		sql.append(" SUM(if(user_type='2' ,user_valid_add_count,0))/count(distinct stat_date) '本月日均VIP新增发帖客户数' ");
		sql.append(" from t_datainfo_stat_new_"+month);
		sql.append(" where stat_date <= '"+date+"' and belong_city1_name in("+cityname+")");
		sql.append(" and platform in ('PC','M','APP','帮帮')");
		sql.append(" and source = 'all' and business_name = 'huangye' and belong_cate2_name = 'all'");
		sql.append(" group by 1,2 order by 1,3 DESC");
		
		List<DataInfo> tempList =comDao.getCommonStatList(sql.toString(), colsList1, DataInfo.class, DBType.db_94_data_app.getValue());
		return  tempList;
	}

	//房产本月
	@Override
	public List<DataInfo> getFCDataInfo(String date,String cityname) throws Exception{
		
		String month = date.substring(0,date.lastIndexOf("-")).replace("-", "");
		StringBuffer sql = new StringBuffer();
		String cols1[]={"city","cate","infoAdd","userAdd","infoAdd_VIP","userAdd_VIP","avgInfoAdd","avgUserAdd","avgInfoAdd_VIP","avgUserAdd_VIP"};
		List<String> colsList1=Arrays.asList(cols1);

		sql.delete(0, sql.length()+1);
		sql.append("select belong_city1_name,case when belong_cate2_name='all' then '总体' else  belong_cate2_name end,");
		sql.append(" SUM(if(stat_date='"+date+"' and user_type='all',info_valid_add_count,0)) '今日新增帖子数', ");
		sql.append(" sum(if(stat_date='"+date+"' and user_type='all',user_valid_add_count,0)) '今日新增发帖客户数', ");
		sql.append(" SUM(if(stat_date='"+date+"' and user_type='2',info_valid_add_count,0)) 'VIP今日新增帖子数', ");
		sql.append(" sum(if(stat_date='"+date+"' and user_type='2',user_valid_add_count,0)) 'VIP今日新增发帖客户数', ");
		sql.append(" SUM(if(user_type='all' ,info_valid_add_count,0))/count(distinct stat_date) '截至今日本月日均新增帖子数', ");
		sql.append(" SUM(if(user_type='all' ,user_valid_add_count,0))/count(distinct stat_date) '本月日均新增发帖客户数', ");
		sql.append(" SUM(if(user_type='2' ,info_valid_add_count,0))/count(distinct stat_date) '截至今日本月VIP日均新增帖子数', ");
		sql.append(" SUM(if(user_type='2' ,user_valid_add_count,0))/count(distinct stat_date) '本月日均VIP新增发帖客户数' ");
		sql.append(" from t_datainfo_stat_new_"+month);
		sql.append(" where stat_date <= '"+date+"' and belong_city1_name in("+cityname+")");
		sql.append(" and platform in ('PC','M','APP','帮帮')");
		sql.append(" and source = 'all' and business_name = 'fangchan'");
		sql.append(" and belong_cate1_name != 'all'");
		sql.append(" group by 1,2 order by 1,3 DESC");
		
		List<DataInfo> tempList = comDao.getCommonStatList(sql.toString(), colsList1, DataInfo.class, DBType.db_94_data_app.getValue());
		return  tempList;
	}

	//招聘本月
	@Override
	public List<DataInfo> getZhaopinDataInfo(String date,String cityname) throws Exception{
		Map<String,List<String>> sqlMap = new HashMap<String,List<String>>();
//		Map<String,DataInfo> voMap = new HashMap<String,DataInfo>();
		
		String month = date.substring(0,date.lastIndexOf("-")).replace("-", "");
		List<String> gbList = new ArrayList<String>();
		gbList.add("city");
		gbList.add("cate");
		String cols1[]={"city","cate","infoAdd","userAdd","infoAdd_VIP","userAdd_VIP"};
		String cols2[]={"city","cate","avgInfoAdd","avgUserAdd","avgInfoAdd_VIP","avgUserAdd_VIP"};
		List<String> colsList1=Arrays.asList(cols1);
		List<String> colsList2=Arrays.asList(cols2);
		
		StringBuffer sql = new StringBuffer();
//		StringUtils.join(, );
//		sql.append("select belong_city1_name,case when belong_cate2_name='all' then '总体' else belong_cate2_name end,");
		//总体
		sql.append("select belong_city1_name,case when business_name = 'zhaopin' then '总体' end,");
		sql.append(" SUM(info_valid_add_count) '今日新增帖子数' ,");
		sql.append(" count(distinct case when info_valid_add_count>0 then user_id end) '今日新增发帖客户数',");
		sql.append(" SUM(if(is_vip=1,info_valid_add_count,0)) 'VIP今日新增帖子数' ,");
		sql.append(" count(distinct case when is_vip=1 and info_valid_add_count>0 then user_id end) 'VIP今日新增发帖客户数'");
		sql.append(" from t_datainfo_stat_userid_"+month);
		sql.append(" where stat_date = '"+date+"' and business_name = 'zhaopin' and belong_city1_name in("+cityname+")");
		sql.append(" and belong_cate1_name in ('常规招聘','兼职招聘')");
		sql.append(" and user_id not in ( ");
			sql.append(" select distinct user_id from t_common_order_info");
			sql.append(" where product_id = 100201 and version_name in ('金牌HR版A',	'HR版',	'HR半年版（上海）',	'普通HR版季度版',	'2013HR版',	'2013HR版（上海）',	'普通HR版A',	'金牌HR版B',	'金牌HR版C',	'普通HR版B',	'新HR版',	'HR半年版（石家庄）',	'新HR版测试',	'2013HR版（石家庄）')");
			sql.append(" and order_state in (45,50)  ");
			sql.append(" and service_begin_time<='"+date+"' and service_end_time>='"+date+"'");
			sql.append(" ) ");
		sql.append(" group by 1,2 order by 1,3 DESC");
		sql.append(" :"+DBType.db_94_data_app.getValue());
		sqlMap.put(sql.toString(),colsList1);
		
		sql.delete(0, sql.length()+1);
		sql.append("select belong_city1_name,case when business_name = 'zhaopin' then '总体' end,");
		sql.append(" SUM(info_valid_add_count)/count(distinct stat_date) '截至今日本月日均新增帖子数' ,");
		sql.append(" count(distinct case when info_valid_add_count>0 then user_id end)/count(distinct stat_date) '本月日均新增发帖客户数',");
		sql.append(" SUM(if(is_vip=1,info_valid_add_count,0))/count(distinct stat_date) '截至今日本月VIP日均新增帖子数' ,");
		sql.append(" count(distinct case when is_vip=1 and info_valid_add_count>0 then user_id end)/count(distinct stat_date) '本月VIP日均新增发帖客户数'");
		sql.append(" from t_datainfo_stat_userid_"+month);
		sql.append(" where stat_date <= '"+date+"' and business_name = 'zhaopin' and belong_city1_name in("+cityname+")");
		sql.append(" and belong_cate1_name in ('常规招聘','兼职招聘')");
		sql.append(" and user_id not in ( ");
			sql.append(" select distinct user_id from t_common_order_info");
			sql.append(" where product_id = 100201 and version_name in ('金牌HR版A',	'HR版',	'HR半年版（上海）',	'普通HR版季度版',	'2013HR版',	'2013HR版（上海）',	'普通HR版A',	'金牌HR版B',	'金牌HR版C',	'普通HR版B',	'新HR版',	'HR半年版（石家庄）',	'新HR版测试',	'2013HR版（石家庄）')");
			sql.append(" and order_state in (45,50)  ");
			sql.append(" and service_end_time>='"+date.substring(0,date.lastIndexOf("-"))+"-01'");
			sql.append(" ) ");
		sql.append(" group by 1,2 order by 1,3 DESC");
		sql.append(" :"+DBType.db_94_data_app.getValue());
		sqlMap.put(sql.toString(),colsList2);
		
//		List<DataInfo> tempList =comDeal.AssembledDataBySqlMap(sqlMap,DataInfo.class, gbList);
//		if(tempList == null)
//			return null;
//		
//		sqlMap.clear();
		
		//分类别
		sql.delete(0, sql.length()+1);
		sql.append("select belong_city1_name,belong_cate2_name,");
		sql.append(" SUM(info_valid_add_count) '今日新增帖子数' ,");
		sql.append(" count(distinct case when info_valid_add_count>0 then user_id end) '今日新增发帖客户数',");
		sql.append(" SUM(if(is_vip=1,info_valid_add_count,0)) 'VIP今日新增帖子数' ,");
		sql.append(" count(distinct case when is_vip=1 and info_valid_add_count>0 then user_id end) 'VIP今日新增发帖客户数'");
		sql.append(" from t_datainfo_stat_userid_"+month);
		sql.append(" where stat_date = '"+date+"' and business_name = 'zhaopin' and belong_city1_name in("+cityname+")");
		sql.append(" and belong_cate1_name in ('常规招聘','兼职招聘')");
		sql.append(" and user_id not in ( ");
			sql.append(" select distinct user_id from t_common_order_info");
			sql.append(" where product_id = 100201 and version_name in ('金牌HR版A',	'HR版',	'HR半年版（上海）',	'普通HR版季度版',	'2013HR版',	'2013HR版（上海）',	'普通HR版A',	'金牌HR版B',	'金牌HR版C',	'普通HR版B',	'新HR版',	'HR半年版（石家庄）',	'新HR版测试',	'2013HR版（石家庄）')");
			sql.append(" and order_state in (45,50)  ");
			sql.append(" and service_begin_time<='"+date+"' and service_end_time>='"+date+"'");
			sql.append(" ) ");
		sql.append(" group by 1,2 order by 1,3 DESC");
		sql.append(" :"+DBType.db_94_data_app.getValue());
		sqlMap.put(sql.toString(),colsList1);
		
		sql.delete(0, sql.length()+1);
		sql.append("select belong_city1_name,belong_cate2_name,");
		sql.append(" SUM(info_valid_add_count)/count(distinct stat_date) '截至今日本月日均新增帖子数' ,");
		sql.append(" count(distinct case when info_valid_add_count>0 then user_id end)/count(distinct stat_date) '本月日均新增发帖客户数',");
		sql.append(" SUM(if(is_vip=1,info_valid_add_count,0))/count(distinct stat_date) '截至今日本月VIP日均新增帖子数' ,");
		sql.append(" count(distinct case when is_vip=1 and info_valid_add_count>0 then user_id end)/count(distinct stat_date) '本月VIP日均新增发帖客户数'");
		sql.append(" from t_datainfo_stat_userid_"+month);
		sql.append(" where stat_date <= '"+date+"' and business_name = 'zhaopin' and belong_city1_name in("+cityname+")");
		sql.append(" and belong_cate1_name in ('常规招聘','兼职招聘')");
		sql.append(" and user_id not in ( ");
			sql.append(" select distinct user_id from t_common_order_info");
			sql.append(" where product_id = 100201 and version_name in ('金牌HR版A',	'HR版',	'HR半年版（上海）',	'普通HR版季度版',	'2013HR版',	'2013HR版（上海）',	'普通HR版A',	'金牌HR版B',	'金牌HR版C',	'普通HR版B',	'新HR版',	'HR半年版（石家庄）',	'新HR版测试',	'2013HR版（石家庄）')");
			sql.append(" and order_state in (45,50)  ");
			sql.append(" and service_end_time>='"+date.substring(0,date.lastIndexOf("-"))+"-01'");
			sql.append(" ) ");
		sql.append(" group by 1,2 order by 1,3 DESC");   
		sql.append(" :"+DBType.db_94_data_app.getValue());
		sqlMap.put(sql.toString(),colsList2);
		List<DataInfo> tempList =comDeal.AssembledDataBySqlMap(sqlMap,DataInfo.class, gbList);
//		tempList.addAll(comDeal.AssembledDataBySqlMap(sqlMap,DataInfo.class, gbList));	
		sortUtil.sortListByFileNameVo(tempList, DataInfo.class, "infoAdd", 2);
		return tempList;
	}
	//简历
	@Override
	public List<DataInfo> getJianLiDataInfo(String date,String cityname) throws Exception{
		String month = date.substring(0,date.lastIndexOf("-")).replace("-", "");
		StringBuffer sql = new StringBuffer();
		Map<String,List<String>> sqlMap = new HashMap<String,List<String>>();
		
		String cols3[]={"city","cate","PCJianLiAdd","MJianLiAdd","APPJianLiAdd","totalJianLiAdd","addJianLiUser"};
		List<String> colsList3=Arrays.asList(cols3);
		sql.delete(0, sql.length()+1);
		sql.append("select TargetArea1,TargetCate2,COUNT(DISTINCT case when Source in(1,5,6,11) then  ID end) 'PC新增简历量',");
		sql.append(" COUNT(DISTINCT case when Source in(3,10,12,13,16) then ID END)  'M新增简历量', ");
		sql.append(" COUNT(DISTINCT case when Source in(2,7,9,14) then ID END)  'APP新增简历量', ");
		sql.append(" COUNT(DISTINCT ID)  '总体新增简历量', ");
		sql.append(" count(distinct UserID) '创建简历人数' ");
		sql.append(" from t_resume_r_"+month);
		sql.append(" where DATE(AddDate) = '"+date+"' and stat_date = '"+date+"'");
		sql.append(" and TargetArea1 in("+cityname+")");
		sql.append(" group by 1,2");
		sql.append(" :"+DBType.db_94_data_app.getValue());		
		sqlMap.put(sql.toString(),colsList3);
		
		sql.delete(0, sql.length()+1);
		sql.append("select TargetArea1,case when stat_date = '"+date+"' then '总体' end,COUNT(DISTINCT case when Source in(1,5,6,11) then  ID end) 'PC新增简历量',");
		sql.append(" COUNT(DISTINCT case when Source in(3,10,12,13,16) then ID END)  'M新增简历量', ");
		sql.append(" COUNT(DISTINCT case when Source in(2,7,9,14) then ID END)  'APP新增简历量', ");
		sql.append(" COUNT(DISTINCT ID)  '总体新增简历量', ");
		sql.append(" count(distinct UserID) '创建简历人数' ");
		sql.append(" from t_resume_r_"+month);
		sql.append(" where DATE(AddDate) = '"+date+"' and stat_date = '"+date+"'");
		sql.append(" and TargetArea1 in("+cityname+")");
		sql.append(" group by 1,2");
		sql.append(" :"+DBType.db_94_data_app.getValue());		
		sqlMap.put(sql.toString(),colsList3);
		
		List<String> gbList = new ArrayList<String>();
		gbList.add("city");gbList.add("cate");
		List<DataInfo> tempList = comDeal.AssembledDataBySqlMap(sqlMap, DataInfo.class, gbList);
		return tempList;
	}
	
	////黄页昨日，上周
	@Override
	public List<DataInfo> getOneHYDataInfo(String date,String cityname) throws Exception{
		
		String month = date.substring(0,date.lastIndexOf("-")).replace("-", "");
		StringBuffer sql = new StringBuffer();
		String cols1[]={"city","cate","infoAdd","userAdd","infoAdd_VIP","userAdd_VIP"};
		List<String> colsList1=Arrays.asList(cols1);
		
		sql.append("select belong_city1_name,case when belong_cate1_name='all' then '总体' else belong_cate1_name end,");
		sql.append(" SUM(if(user_type='all' ,info_valid_add_count,0)) '今日新增帖子数', ");
		sql.append(" SUM(if(user_type='all' ,user_valid_add_count,0)) '今日新增发帖客户数', ");
		sql.append(" SUM(if(stat_date='"+date+"' and user_type='2',info_valid_add_count,0)) 'VIP今日新增帖子数', ");
		sql.append(" sum(if(stat_date='"+date+"' and user_type='2',user_valid_add_count,0)) 'VIP今日新增发帖客户数' ");
		sql.append(" from t_datainfo_stat_new_"+month);
		sql.append(" where stat_date = '"+date+"' and belong_city1_name in("+cityname+")");
		sql.append(" and platform in ('PC','M','APP','帮帮')");
		sql.append(" and source = 'all' and business_name = 'huangye' and belong_cate2_name = 'all'");
		sql.append(" group by 1,2");
		List<DataInfo> tempList =comDao.getCommonStatList(sql.toString(), colsList1, DataInfo.class, DBType.db_94_data_app.getValue());
		return  tempList;
	}

	@Override
	public List<DataInfo> getOneFCDataInfo(String date,String cityname) throws Exception{
		String month = date.substring(0,date.lastIndexOf("-")).replace("-", "");
		StringBuffer sql = new StringBuffer();
		String cols1[]={"city","cate","infoAdd","userAdd","infoAdd_VIP","userAdd_VIP"};
		List<String> colsList1=Arrays.asList(cols1);

		sql.delete(0, sql.length()+1);
		sql.append("select belong_city1_name,case when belong_cate2_name='all' then '总体' else  belong_cate2_name end,");
		sql.append(" SUM(if(user_type='all' ,info_valid_add_count,0)) '今日新增帖子数', ");
		sql.append(" SUM(if(user_type='all' ,user_valid_add_count,0)) '今日新增发帖客户数', ");
		sql.append(" SUM(if(stat_date='"+date+"' and user_type='2',info_valid_add_count,0)) 'VIP今日新增帖子数', ");
		sql.append(" sum(if(stat_date='"+date+"' and user_type='2',user_valid_add_count,0)) 'VIP今日新增发帖客户数' ");
		sql.append(" from t_datainfo_stat_new_"+month);
		sql.append(" where stat_date  = '"+date+"' and belong_city1_name in("+cityname+")");
		sql.append(" and platform in ('PC','M','APP','帮帮')");
		sql.append(" and source = 'all' and business_name = 'fangchan'");
		sql.append(" and belong_cate1_name != 'all'");
		sql.append(" group by 1,2");
		List<DataInfo> tempList = comDao.getCommonStatList(sql.toString(), colsList1, DataInfo.class, DBType.db_94_data_app.getValue());
		return  tempList;
	}

	@Override
	public List<DataInfo> getOneZhaopinDataInfo(String date,String cityname) throws Exception{
		Map<String,List<String>> sqlMap = new HashMap<String,List<String>>();
//		Map<String,DataInfo> voMap = new HashMap<String,DataInfo>();
		
		String month = date.substring(0,date.lastIndexOf("-")).replace("-", "");
		List<String> gbList = new ArrayList<String>();
		gbList.add("city");
		gbList.add("cate");
		
		String cols1[]={"city","cate","infoAdd","userAdd","infoAdd_VIP","userAdd_VIP"};
		List<String> colsList1=Arrays.asList(cols1);
		
		StringBuffer sql = new StringBuffer();
		//总体
		sql.append("select belong_city1_name,case when business_name = 'zhaopin' then '总体' end,");
		sql.append(" SUM(info_valid_add_count) '今日新增帖子数' ,");
		sql.append(" count(distinct case when info_valid_add_count>0 then user_id end) '今日新增发帖客户数',");
		sql.append(" SUM(if(is_vip=1,info_valid_add_count,0)) 'VIP今日新增帖子数' ,");
		sql.append(" count(distinct case when is_vip=1 and info_valid_add_count>0 then user_id end) 'VIP今日新增发帖客户数'");
		sql.append(" from t_datainfo_stat_userid_"+month);
		sql.append(" where stat_date = '"+date+"' and business_name = 'zhaopin' and belong_city1_name in("+cityname+")");
		sql.append(" and belong_cate1_name in ('常规招聘','兼职招聘')");
		sql.append(" and user_id not in ( ");
			sql.append(" select distinct user_id from t_common_order_info");
			sql.append(" where product_id = 100201 and version_name in ('金牌HR版A',	'HR版',	'HR半年版（上海）',	'普通HR版季度版',	'2013HR版',	'2013HR版（上海）',	'普通HR版A',	'金牌HR版B',	'金牌HR版C',	'普通HR版B',	'新HR版',	'HR半年版（石家庄）',	'新HR版测试',	'2013HR版（石家庄）')");
			sql.append(" and order_state in (45,50)  ");
			sql.append(" and service_begin_time<='"+date+"' and service_end_time>='"+date+"'");
			sql.append(" ) ");
		sql.append(" group by 1,2 order by 1,3 DESC");
		sql.append(" :"+DBType.db_94_data_app.getValue());
		sqlMap.put(sql.toString(),colsList1);
		
		//分类别
		sql.delete(0, sql.length()+1);
		sql.append("select belong_city1_name,belong_cate2_name,");
		sql.append(" SUM(info_valid_add_count) '今日新增帖子数' ,");
		sql.append(" count(distinct case when info_valid_add_count>0 then user_id end) '今日新增发帖客户数',");
		sql.append(" SUM(if(is_vip=1,info_valid_add_count,0)) 'VIP今日新增帖子数' ,");
		sql.append(" count(distinct case when is_vip=1 and info_valid_add_count>0 then user_id end) 'VIP今日新增发帖客户数'");
		sql.append(" from t_datainfo_stat_userid_"+month);
		sql.append(" where stat_date = '"+date+"' and business_name = 'zhaopin' and belong_city1_name in("+cityname+")");
		sql.append(" and belong_cate1_name in ('常规招聘','兼职招聘')");
		sql.append(" and user_id not in ( ");
			sql.append(" select distinct user_id from t_common_order_info");
			sql.append(" where product_id = 100201 and version_name in ('金牌HR版A',	'HR版',	'HR半年版（上海）',	'普通HR版季度版',	'2013HR版',	'2013HR版（上海）',	'普通HR版A',	'金牌HR版B',	'金牌HR版C',	'普通HR版B',	'新HR版',	'HR半年版（石家庄）',	'新HR版测试',	'2013HR版（石家庄）')");
			sql.append(" and order_state in (45,50)  ");
			sql.append(" and service_begin_time<='"+date+"' and service_end_time>='"+date+"'");
			sql.append(" ) ");
		sql.append(" group by 1,2 order by 1,3 DESC");
		sql.append(" :"+DBType.db_94_data_app.getValue());
		sqlMap.put(sql.toString(),colsList1);
		
		List<DataInfo> tempList =comDeal.AssembledDataBySqlMap(sqlMap,DataInfo.class, gbList);

		return tempList;
	}
	
}
